import $api from '../../api'

export default {
    namespaced: true,
    state: {
        user: {
            account: '',
            password: ''
        }
    },
    mutations: {

    },
    actions: {
        async asyncLogin(context, payload) {
            const res = await $api.login.getLogin(payload)
            if (res.data.code) {
                localStorage.setItem('token', res.data.token)
                return res.data
            }
        }
    }
}